﻿#region using statements

using System;

using Nuclex.UserInterface;
using Nuclex.UserInterface.Controls.Desktop;

#endregion

namespace XNAGameDemo.GUI
{
	public class WindowWithOkButtonControl : WindowControl
	{
		private readonly ButtonControl m_okButton = new ButtonControl();

		public WindowWithOkButtonControl() {
			m_okButton.Bounds = new UniRectangle(new UniScalar(0.5f, -37.5f), new UniScalar(0.85f, 0.0f), new UniScalar(75.0f), new UniScalar(35.0f));
			m_okButton.Text = "Ok";
			m_okButton.Pressed += _OkButtonClick;

			Children.Add(m_okButton);
		}

		public ButtonControl OkButton {
			get { return m_okButton; }
		}

		protected virtual void _OkButtonClick(object p_sender, EventArgs p_e) {
			Close();
		}
	}
}